Skip to content

Conversation

@Jondolf
Copy link
Member

@Jondolf Jondolf commented Jan 18, 2026

Objective

Fixes #922.

If you try to despawn a sleeping body, you might occasionally get a warning like "Tried to wake body 3127v2 that does not exist". This is because we have a hook that applies the WakeBody command when Sleeping is removed, and that command emits a warning for non-existent bodies.

Solution

Use proper error handling for the command, and use queue_silenced in the hook.

Testing

Despawned some sleeping bodies.

@Jondolf Jondolf added this to the 0.6 milestone Jan 18, 2026
@Jondolf Jondolf added C-Bug Something isn't working A-Dynamics Relates to rigid body dynamics: motion, mass, constraint solving, joints, CCD, and so on D-Straightforward Simple bug fixes and API improvements, docs, test and examples labels Jan 18, 2026
@Jondolf Jondolf added the M-Migration-Guide A breaking change to Avian's public API that needs to be noted in a migration guide label Jan 18, 2026
@Jondolf Jondolf enabled auto-merge (squash) January 18, 2026 14:00
@Jondolf Jondolf merged commit cbc9a21 into main Jan 18, 2026
6 checks passed
@Jondolf Jondolf deleted the fix-nonexistent-wake-error branch January 18, 2026 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Dynamics Relates to rigid body dynamics: motion, mass, constraint solving, joints, CCD, and so on C-Bug Something isn't working D-Straightforward Simple bug fixes and API improvements, docs, test and examples M-Migration-Guide A breaking change to Avian's public API that needs to be noted in a migration guide

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Despawning sleeping entities emits warnings

2 participants